package org.example.springboot3.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.example.springboot3.domain.Registrations;
import org.example.springboot3.service.RegistrationsService;
import org.example.springboot3.mapper.RegistrationsMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author xu264
* @description 针对表【registrations】的数据库操作Service实现
* @createDate 2025-05-26 13:27:54
*/
@Service
public class RegistrationsServiceImpl extends ServiceImpl<RegistrationsMapper, Registrations>
    implements RegistrationsService{
    @Resource
    private RegistrationsMapper registrationsMapper;

    public List<String> getMyActivityList(String id) {
        return registrationsMapper.getMyActivityList(id);
    }
    public String getParticipantNum(String id){
        return registrationsMapper.getParticipantNum(id);
    }
    public int exitActivity(String userId,String activityId){
        return registrationsMapper.exitActivity(userId,activityId);
    }
    public int deleteByActivityId(String activityId){
        return registrationsMapper.deleteByActivityId(activityId);
    }
}




